package com.chenjl.serialization;

import java.io.IOException;
/**
 * 序列化声明
 * 2016-9-2 11:23:18
 * @author chenjinlong
 */
public interface Serialization {
	/**
	 * 
	 * @return
	 */
	public String getContentType();
	/**
	 * 序列化对象
	 * @param object
	 * @return
	 */
	public byte[] toByte(Object object) throws IOException;
	/**
	 * 反序列化
	 * @param bytes
	 * @return
	 */
	public Object toObject(byte[] bytes) throws IOException;
}